<template>
  <el-dialog
    :title="!dataForm.id ? '新增' : '修改'"
    :close-on-click-modal="false"
    @close="closeDialog()"
    :visible.sync="visible">
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
    <el-form-item label="主键id，唯一标识" prop="id" v-if="dataForm.id">
        <el-input v-model="dataForm.id" placeholder="主键id，唯一标识" disabled></el-input>
    </el-form-item>
    <el-form-item label="示例： 7027440123969015046" prop="jId">
        <el-input v-model="dataForm.jId" placeholder="示例： 7027440123969015046"></el-input>
    </el-form-item>
    <el-form-item label="示例： HANGE IS BACK AGAIN THIS MORNING!!!! Everyone say good morning to hange #aot" prop="jDesc">
        <el-input v-model="dataForm.jDesc" placeholder="示例： HANGE IS BACK AGAIN THIS MORNING!!!! Everyone say good morning to hange #aot"></el-input>
    </el-form-item>
    <el-form-item label="示例： 1636203409" prop="jCreatetime">
        <el-input v-model="dataForm.jCreatetime" placeholder="示例： 1636203409"></el-input>
    </el-form-item>
    <el-form-item label="示例： 7027440123969015046" prop="videoId">
        <el-input v-model="dataForm.videoId" placeholder="示例： 7027440123969015046"></el-input>
    </el-form-item>
    <el-form-item label="示例： 1024" prop="videoHeight">
        <el-input v-model="dataForm.videoHeight" placeholder="示例： 1024"></el-input>
    </el-form-item>
    <el-form-item label="示例： 576" prop="videoWidth">
        <el-input v-model="dataForm.videoWidth" placeholder="示例： 576"></el-input>
    </el-form-item>
    <el-form-item label="示例： 12" prop="videoDuration">
        <el-input v-model="dataForm.videoDuration" placeholder="示例： 12"></el-input>
    </el-form-item>
    <el-form-item label="示例： 720p" prop="videoRatio">
        <el-input v-model="dataForm.videoRatio" placeholder="示例： 720p"></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/5a2c2b6e3aed4d86a8da96c1a1f3238b_1636203409?x-expires=1637686800&x-signature=mWGLDi91/emKwUGWyQZYoPENGZs=" prop="videoCover">
        <el-input v-model="dataForm.videoCover" placeholder="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/5a2c2b6e3aed4d86a8da96c1a1f3238b_1636203409?x-expires=1637686800&x-signature=mWGLDi91/emKwUGWyQZYoPENGZs="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/32abdd232c58451598df8ba4055ce63c_1636203409?x-expires=1637686800&x-signature=83ZGvND6NR83QMtj7qnw/PjXc7s=" prop="videoOrigincover">
        <el-input v-model="dataForm.videoOrigincover" placeholder="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/32abdd232c58451598df8ba4055ce63c_1636203409?x-expires=1637686800&x-signature=83ZGvND6NR83QMtj7qnw/PjXc7s="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/c9ac2df8ee554b8bb3c0963feed19d00_1636203410?x-expires=1637686800&x-signature=whQYi9W1Dl2iO/AiF0k0FyJLWuQ=" prop="videoDynamiccover">
        <el-input v-model="dataForm.videoDynamiccover" placeholder="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/c9ac2df8ee554b8bb3c0963feed19d00_1636203410?x-expires=1637686800&x-signature=whQYi9W1Dl2iO/AiF0k0FyJLWuQ="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/450b0b37a0594ccebbdcc061a8e6199f/?a=1988&br=3046&bt=1523&cd=0|0|1&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1637687595&ft=wUyFfFGgkag3-I&l=202111231113030102230720352700A434&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&policy=3&qs=0&rc=M3J3eTs6Zmo6OTMzNzczM0ApODg7OGhkNDwzN2UzZzU4ZmdeYWpjcjRfajBgLS1kMTZzcy0zMV9gNDMzMS8vM2I2MjI6Yw==&signature=3d6024e6f520f1984ee608e2a6aac522&tk=7031996832457786374&vl=&vr=" prop="videoPlayaddr">
        <el-input v-model="dataForm.videoPlayaddr" placeholder="示例： https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/450b0b37a0594ccebbdcc061a8e6199f/?a=1988&br=3046&bt=1523&cd=0|0|1&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1637687595&ft=wUyFfFGgkag3-I&l=202111231113030102230720352700A434&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&policy=3&qs=0&rc=M3J3eTs6Zmo6OTMzNzczM0ApODg7OGhkNDwzN2UzZzU4ZmdeYWpjcjRfajBgLS1kMTZzcy0zMV9gNDMzMS8vM2I2MjI6Yw==&signature=3d6024e6f520f1984ee608e2a6aac522&tk=7031996832457786374&vl=&vr="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/450b0b37a0594ccebbdcc061a8e6199f/?a=1988&br=3046&bt=1523&cd=0|0|1&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1637687595&ft=wUyFfFGgkag3-I&l=202111231113030102230720352700A434&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&policy=3&qs=0&rc=M3J3eTs6Zmo6OTMzNzczM0ApODg7OGhkNDwzN2UzZzU4ZmdeYWpjcjRfajBgLS1kMTZzcy0zMV9gNDMzMS8vM2I2MjI6Yw==&signature=3d6024e6f520f1984ee608e2a6aac522&tk=7031996832457786374&vl=&vr=" prop="videoDownloadaddr">
        <el-input v-model="dataForm.videoDownloadaddr" placeholder="示例： https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/450b0b37a0594ccebbdcc061a8e6199f/?a=1988&br=3046&bt=1523&cd=0|0|1&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1637687595&ft=wUyFfFGgkag3-I&l=202111231113030102230720352700A434&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&policy=3&qs=0&rc=M3J3eTs6Zmo6OTMzNzczM0ApODg7OGhkNDwzN2UzZzU4ZmdeYWpjcjRfajBgLS1kMTZzcy0zMV9gNDMzMS8vM2I2MjI6Yw==&signature=3d6024e6f520f1984ee608e2a6aac522&tk=7031996832457786374&vl=&vr="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/3d8db6b37675bf4fd0300935c7df5917?x-expires=1637686800&x-signature=zw6S1U9+NmEz6j0ZjBhhPi9cc3M=" prop="videoReflowcover">
        <el-input v-model="dataForm.videoReflowcover" placeholder="示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/3d8db6b37675bf4fd0300935c7df5917?x-expires=1637686800&x-signature=zw6S1U9+NmEz6j0ZjBhhPi9cc3M="></el-input>
    </el-form-item>
    <el-form-item label="示例： 1560439" prop="videoBitrate">
        <el-input v-model="dataForm.videoBitrate" placeholder="示例： 1560439"></el-input>
    </el-form-item>
    <el-form-item label="示例： normal" prop="videoEncodedtype">
        <el-input v-model="dataForm.videoEncodedtype" placeholder="示例： normal"></el-input>
    </el-form-item>
    <el-form-item label="示例： mp4" prop="videoFormat">
        <el-input v-model="dataForm.videoFormat" placeholder="示例： mp4"></el-input>
    </el-form-item>
    <el-form-item label="示例： normal" prop="videoVideoquality">
        <el-input v-model="dataForm.videoVideoquality" placeholder="示例： normal"></el-input>
    </el-form-item>
    <el-form-item label="示例： " prop="videoEncodeusertag">
        <el-input v-model="dataForm.videoEncodeusertag" placeholder="示例： "></el-input>
    </el-form-item>
    <el-form-item label="示例： h264" prop="videoCodectype">
        <el-input v-model="dataForm.videoCodectype" placeholder="示例： h264"></el-input>
    </el-form-item>
    <el-form-item label="示例： 720p" prop="videoDefinition">
        <el-input v-model="dataForm.videoDefinition" placeholder="示例： 720p"></el-input>
    </el-form-item>
    <el-form-item label="示例： 1300000" prop="statsDiggcount">
        <el-input v-model="dataForm.statsDiggcount" placeholder="示例： 1300000"></el-input>
    </el-form-item>
    <el-form-item label="示例： 17800" prop="statsSharecount">
        <el-input v-model="dataForm.statsSharecount" placeholder="示例： 17800"></el-input>
    </el-form-item>
    <el-form-item label="示例： 20700" prop="statsCommentcount">
        <el-input v-model="dataForm.statsCommentcount" placeholder="示例： 20700"></el-input>
    </el-form-item>
    <el-form-item label="示例： 7000000" prop="statsPlaycount">
        <el-input v-model="dataForm.statsPlaycount" placeholder="示例： 7000000"></el-input>
    </el-form-item>
    <el-form-item label="示例： 6649974064393977861" prop="authorId">
        <el-input v-model="dataForm.authorId" placeholder="示例： 6649974064393977861"></el-input>
    </el-form-item>
    <el-form-item label="示例： sofiiiiagomez" prop="authorUniqueid">
        <el-input v-model="dataForm.authorUniqueid" placeholder="示例： sofiiiiagomez"></el-input>
    </el-form-item>
    <el-form-item label="示例： sofia gomez" prop="authorNickname">
        <el-input v-model="dataForm.authorNickname" placeholder="示例： sofia gomez"></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_100x100.jpeg?x-expires=1637751600&x-signature=3pKhW6bvDYCjxXFU+p9Lx5g6SSU=" prop="authorAvatarthumb">
        <el-input v-model="dataForm.authorAvatarthumb" placeholder="示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_100x100.jpeg?x-expires=1637751600&x-signature=3pKhW6bvDYCjxXFU+p9Lx5g6SSU="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_720x720.jpeg?x-expires=1637751600&x-signature=ICIxhLYQ5iF4W7O4RB6ZUE1MGQ8=" prop="authorAvatarmedium">
        <el-input v-model="dataForm.authorAvatarmedium" placeholder="示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_720x720.jpeg?x-expires=1637751600&x-signature=ICIxhLYQ5iF4W7O4RB6ZUE1MGQ8="></el-input>
    </el-form-item>
    <el-form-item label="示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_1080x1080.jpeg?x-expires=1637751600&x-signature=qMTvV0zxh9QZwAZvxd+BMOQbElU=" prop="authorAvatarlarger">
        <el-input v-model="dataForm.authorAvatarlarger" placeholder="示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_1080x1080.jpeg?x-expires=1637751600&x-signature=qMTvV0zxh9QZwAZvxd+BMOQbElU="></el-input>
    </el-form-item>
    <el-form-item label="示例： 19    Ig -sofiiiiagomez    Snap- sofiagomezzz    Sofia.n.gomez.business@gmail.co" prop="authorSignature">
        <el-input v-model="dataForm.authorSignature" placeholder="示例： 19    Ig -sofiiiiagomez    Snap- sofiagomezzz    Sofia.n.gomez.business@gmail.co"></el-input>
    </el-form-item>
    <el-form-item label="示例： False" prop="authorVerified">
        <el-input v-model="dataForm.authorVerified" placeholder="示例： False"></el-input>
    </el-form-item>
    <el-form-item label="示例： MS4wLjABAAAA3ZATErR3x2B1JcTh5bOzmSTsy2EGegJMIDn9zx9xrk8ZoMlwGfxWyynuto0n5lGc" prop="authorSecuid">
        <el-input v-model="dataForm.authorSecuid" placeholder="示例： MS4wLjABAAAA3ZATErR3x2B1JcTh5bOzmSTsy2EGegJMIDn9zx9xrk8ZoMlwGfxWyynuto0n5lGc"></el-input>
    </el-form-item>
    <el-form-item label="示例： False" prop="authorSecret">
        <el-input v-model="dataForm.authorSecret" placeholder="示例： False"></el-input>
    </el-form-item>
    <el-form-item label="示例： False" prop="authorFtc">
        <el-input v-model="dataForm.authorFtc" placeholder="示例： False"></el-input>
    </el-form-item>
    <el-form-item label="示例： 1" prop="authorRelation">
        <el-input v-model="dataForm.authorRelation" placeholder="示例： 1"></el-input>
    </el-form-item>
    <el-form-item label="示例： False" prop="authorOpenfavorite">
        <el-input v-model="dataForm.authorOpenfavorite" placeholder="示例： False"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="authorCommentsetting">
        <el-input v-model="dataForm.authorCommentsetting" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="authorDuetsetting">
        <el-input v-model="dataForm.authorDuetsetting" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="authorStitchsetting">
        <el-input v-model="dataForm.authorStitchsetting" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： False" prop="authorPrivateaccount">
        <el-input v-model="dataForm.authorPrivateaccount" placeholder="示例： False"></el-input>
    </el-form-item>
    <el-form-item label="示例： 1681" prop="authorstatsFollowingcount">
        <el-input v-model="dataForm.authorstatsFollowingcount" placeholder="示例： 1681"></el-input>
    </el-form-item>
    <el-form-item label="示例： 5000000" prop="authorstatsFollowercount">
        <el-input v-model="dataForm.authorstatsFollowercount" placeholder="示例： 5000000"></el-input>
    </el-form-item>
    <el-form-item label="示例： 90800000" prop="authorstatsHeartcount">
        <el-input v-model="dataForm.authorstatsHeartcount" placeholder="示例： 90800000"></el-input>
    </el-form-item>
    <el-form-item label="示例： 1577" prop="authorstatsVideocount">
        <el-input v-model="dataForm.authorstatsVideocount" placeholder="示例： 1577"></el-input>
    </el-form-item>
    <el-form-item label="示例： 136400" prop="authorstatsDiggcount">
        <el-input v-model="dataForm.authorstatsDiggcount" placeholder="示例： 136400"></el-input>
    </el-form-item>
    <el-form-item label="示例： 90800000" prop="authorstatsHeart">
        <el-input v-model="dataForm.authorstatsHeart" placeholder="示例： 90800000"></el-input>
    </el-form-item>
    <el-form-item label="示例： 原标题的中文翻译，或者自定义标题" prop="myTitleCn">
        <el-input v-model="dataForm.myTitleCn" placeholder="示例： 原标题的中文翻译，或者自定义标题"></el-input>
    </el-form-item>
    <el-form-item label="示例： 视频本地文件路径" prop="myVideoPath">
        <el-input v-model="dataForm.myVideoPath" placeholder="示例： 视频本地文件路径"></el-input>
    </el-form-item>
    <el-form-item label="示例： 视频封面本地文件路径" prop="myVideoCoverPath">
        <el-input v-model="dataForm.myVideoCoverPath" placeholder="示例： 视频封面本地文件路径"></el-input>
    </el-form-item>
    <el-form-item label="示例： 作者头像本地文件路径" prop="myAuthorAvatarPath">
        <el-input v-model="dataForm.myAuthorAvatarPath" placeholder="示例： 作者头像本地文件路径"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="myFlagShipinhao">
        <el-input v-model="dataForm.myFlagShipinhao" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="myFlagDouyin">
        <el-input v-model="dataForm.myFlagDouyin" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="myFlagKuaishou">
        <el-input v-model="dataForm.myFlagKuaishou" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="myFlagWeishi">
        <el-input v-model="dataForm.myFlagWeishi" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="myFlagHaokan">
        <el-input v-model="dataForm.myFlagHaokan" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="示例： 0" prop="myFlagOthers">
        <el-input v-model="dataForm.myFlagOthers" placeholder="示例： 0"></el-input>
    </el-form-item>
    <el-form-item label="状态：0为禁用；1为正常" prop="myStatus">
        <el-input v-model="dataForm.myStatus" placeholder="状态：0为禁用；1为正常"></el-input>
    </el-form-item>
    <el-form-item label="创建时间" prop="createTime" v-if="dataForm.id">
        <el-input v-model="dataForm.createTime" placeholder="创建时间" disabled></el-input>
    </el-form-item>
    <el-form-item label="创建人" prop="createBy" v-if="dataForm.id">
        <el-input v-model="dataForm.createBy" placeholder="创建人" disabled></el-input>
    </el-form-item>
    <el-form-item label="操作时间" prop="updateTime" v-if="dataForm.id">
        <el-input v-model="dataForm.updateTime" placeholder="操作时间" disabled></el-input>
    </el-form-item>
    <el-form-item label="更新人" prop="updateBy" v-if="dataForm.id">
        <el-input v-model="dataForm.updateBy" placeholder="更新人" disabled></el-input>
    </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
    import {getObj, addObj, putObj} from '@/api/myvideos'

    export default {
    data () {
      return {
        visible: false,
        canSubmit: false,
        dataForm: {
          id: 0,
          jId: '',
          jDesc: '',
          jCreatetime: '',
          videoId: '',
          videoHeight: '',
          videoWidth: '',
          videoDuration: '',
          videoRatio: '',
          videoCover: '',
          videoOrigincover: '',
          videoDynamiccover: '',
          videoPlayaddr: '',
          videoDownloadaddr: '',
          videoReflowcover: '',
          videoBitrate: '',
          videoEncodedtype: '',
          videoFormat: '',
          videoVideoquality: '',
          videoEncodeusertag: '',
          videoCodectype: '',
          videoDefinition: '',
          statsDiggcount: '',
          statsSharecount: '',
          statsCommentcount: '',
          statsPlaycount: '',
          authorId: '',
          authorUniqueid: '',
          authorNickname: '',
          authorAvatarthumb: '',
          authorAvatarmedium: '',
          authorAvatarlarger: '',
          authorSignature: '',
          authorVerified: '',
          authorSecuid: '',
          authorSecret: '',
          authorFtc: '',
          authorRelation: '',
          authorOpenfavorite: '',
          authorCommentsetting: '',
          authorDuetsetting: '',
          authorStitchsetting: '',
          authorPrivateaccount: '',
          authorstatsFollowingcount: '',
          authorstatsFollowercount: '',
          authorstatsHeartcount: '',
          authorstatsVideocount: '',
          authorstatsDiggcount: '',
          authorstatsHeart: '',
          myTitleCn: '',
          myVideoPath: '',
          myVideoCoverPath: '',
          myAuthorAvatarPath: '',
          myFlagShipinhao: '',
          myFlagDouyin: '',
          myFlagKuaishou: '',
          myFlagWeishi: '',
          myFlagHaokan: '',
          myFlagOthers: '',
          myStatus: '',
          createTime: '',
          createBy: '',
          updateTime: '',
          updateBy: ''
        },
        dataRule: {
          jId: [
            { required: true, message: '示例： 7027440123969015046不能为空', trigger: 'blur' }
          ],
          jDesc: [
            { required: true, message: '示例： HANGE IS BACK AGAIN THIS MORNING!!!! Everyone say good morning to hange #aot不能为空', trigger: 'blur' }
          ],
          jCreatetime: [
            { required: true, message: '示例： 1636203409不能为空', trigger: 'blur' }
          ],
          videoId: [
            { required: true, message: '示例： 7027440123969015046不能为空', trigger: 'blur' }
          ],
          videoHeight: [
            { required: true, message: '示例： 1024不能为空', trigger: 'blur' }
          ],
          videoWidth: [
            { required: true, message: '示例： 576不能为空', trigger: 'blur' }
          ],
          videoDuration: [
            { required: true, message: '示例： 12不能为空', trigger: 'blur' }
          ],
          videoRatio: [
            { required: true, message: '示例： 720p不能为空', trigger: 'blur' }
          ],
          videoCover: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/5a2c2b6e3aed4d86a8da96c1a1f3238b_1636203409?x-expires=1637686800&x-signature=mWGLDi91/emKwUGWyQZYoPENGZs=不能为空', trigger: 'blur' }
          ],
          videoOrigincover: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/32abdd232c58451598df8ba4055ce63c_1636203409?x-expires=1637686800&x-signature=83ZGvND6NR83QMtj7qnw/PjXc7s=不能为空', trigger: 'blur' }
          ],
          videoDynamiccover: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/c9ac2df8ee554b8bb3c0963feed19d00_1636203410?x-expires=1637686800&x-signature=whQYi9W1Dl2iO/AiF0k0FyJLWuQ=不能为空', trigger: 'blur' }
          ],
          videoPlayaddr: [
            { required: true, message: '示例： https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/450b0b37a0594ccebbdcc061a8e6199f/?a=1988&br=3046&bt=1523&cd=0|0|1&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1637687595&ft=wUyFfFGgkag3-I&l=202111231113030102230720352700A434&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&policy=3&qs=0&rc=M3J3eTs6Zmo6OTMzNzczM0ApODg7OGhkNDwzN2UzZzU4ZmdeYWpjcjRfajBgLS1kMTZzcy0zMV9gNDMzMS8vM2I2MjI6Yw==&signature=3d6024e6f520f1984ee608e2a6aac522&tk=7031996832457786374&vl=&vr=不能为空', trigger: 'blur' }
          ],
          videoDownloadaddr: [
            { required: true, message: '示例： https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/450b0b37a0594ccebbdcc061a8e6199f/?a=1988&br=3046&bt=1523&cd=0|0|1&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1637687595&ft=wUyFfFGgkag3-I&l=202111231113030102230720352700A434&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&policy=3&qs=0&rc=M3J3eTs6Zmo6OTMzNzczM0ApODg7OGhkNDwzN2UzZzU4ZmdeYWpjcjRfajBgLS1kMTZzcy0zMV9gNDMzMS8vM2I2MjI6Yw==&signature=3d6024e6f520f1984ee608e2a6aac522&tk=7031996832457786374&vl=&vr=不能为空', trigger: 'blur' }
          ],
          videoReflowcover: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/3d8db6b37675bf4fd0300935c7df5917?x-expires=1637686800&x-signature=zw6S1U9+NmEz6j0ZjBhhPi9cc3M=不能为空', trigger: 'blur' }
          ],
          videoBitrate: [
            { required: true, message: '示例： 1560439不能为空', trigger: 'blur' }
          ],
          videoEncodedtype: [
            { required: true, message: '示例： normal不能为空', trigger: 'blur' }
          ],
          videoFormat: [
            { required: true, message: '示例： mp4不能为空', trigger: 'blur' }
          ],
          videoVideoquality: [
            { required: true, message: '示例： normal不能为空', trigger: 'blur' }
          ],
          videoEncodeusertag: [
            { required: true, message: '示例： 不能为空', trigger: 'blur' }
          ],
          videoCodectype: [
            { required: true, message: '示例： h264不能为空', trigger: 'blur' }
          ],
          videoDefinition: [
            { required: true, message: '示例： 720p不能为空', trigger: 'blur' }
          ],
          statsDiggcount: [
            { required: true, message: '示例： 1300000不能为空', trigger: 'blur' }
          ],
          statsSharecount: [
            { required: true, message: '示例： 17800不能为空', trigger: 'blur' }
          ],
          statsCommentcount: [
            { required: true, message: '示例： 20700不能为空', trigger: 'blur' }
          ],
          statsPlaycount: [
            { required: true, message: '示例： 7000000不能为空', trigger: 'blur' }
          ],
          authorId: [
            { required: true, message: '示例： 6649974064393977861不能为空', trigger: 'blur' }
          ],
          authorUniqueid: [
            { required: true, message: '示例： sofiiiiagomez不能为空', trigger: 'blur' }
          ],
          authorNickname: [
            { required: true, message: '示例： sofia gomez不能为空', trigger: 'blur' }
          ],
          authorAvatarthumb: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_100x100.jpeg?x-expires=1637751600&x-signature=3pKhW6bvDYCjxXFU+p9Lx5g6SSU=不能为空', trigger: 'blur' }
          ],
          authorAvatarmedium: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_720x720.jpeg?x-expires=1637751600&x-signature=ICIxhLYQ5iF4W7O4RB6ZUE1MGQ8=不能为空', trigger: 'blur' }
          ],
          authorAvatarlarger: [
            { required: true, message: '示例： https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6400086fa0fed6873b96b24bd925ad5a~c5_1080x1080.jpeg?x-expires=1637751600&x-signature=qMTvV0zxh9QZwAZvxd+BMOQbElU=不能为空', trigger: 'blur' }
          ],
          authorSignature: [
            { required: true, message: '示例： 19    Ig -sofiiiiagomez    Snap- sofiagomezzz    Sofia.n.gomez.business@gmail.co不能为空', trigger: 'blur' }
          ],
          authorVerified: [
            { required: true, message: '示例： False不能为空', trigger: 'blur' }
          ],
          authorSecuid: [
            { required: true, message: '示例： MS4wLjABAAAA3ZATErR3x2B1JcTh5bOzmSTsy2EGegJMIDn9zx9xrk8ZoMlwGfxWyynuto0n5lGc不能为空', trigger: 'blur' }
          ],
          authorSecret: [
            { required: true, message: '示例： False不能为空', trigger: 'blur' }
          ],
          authorFtc: [
            { required: true, message: '示例： False不能为空', trigger: 'blur' }
          ],
          authorRelation: [
            { required: true, message: '示例： 1不能为空', trigger: 'blur' }
          ],
          authorOpenfavorite: [
            { required: true, message: '示例： False不能为空', trigger: 'blur' }
          ],
          authorCommentsetting: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          authorDuetsetting: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          authorStitchsetting: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          authorPrivateaccount: [
            { required: true, message: '示例： False不能为空', trigger: 'blur' }
          ],
          authorstatsFollowingcount: [
            { required: true, message: '示例： 1681不能为空', trigger: 'blur' }
          ],
          authorstatsFollowercount: [
            { required: true, message: '示例： 5000000不能为空', trigger: 'blur' }
          ],
          authorstatsHeartcount: [
            { required: true, message: '示例： 90800000不能为空', trigger: 'blur' }
          ],
          authorstatsVideocount: [
            { required: true, message: '示例： 1577不能为空', trigger: 'blur' }
          ],
          authorstatsDiggcount: [
            { required: true, message: '示例： 136400不能为空', trigger: 'blur' }
          ],
          authorstatsHeart: [
            { required: true, message: '示例： 90800000不能为空', trigger: 'blur' }
          ],
          myTitleCn: [
            { required: true, message: '示例： 原标题的中文翻译，或者自定义标题不能为空', trigger: 'blur' }
          ],
          myVideoPath: [
            { required: true, message: '示例： 视频本地文件路径不能为空', trigger: 'blur' }
          ],
          myVideoCoverPath: [
            { required: true, message: '示例： 视频封面本地文件路径不能为空', trigger: 'blur' }
          ],
          myAuthorAvatarPath: [
            { required: true, message: '示例： 作者头像本地文件路径不能为空', trigger: 'blur' }
          ],
          myFlagShipinhao: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          myFlagDouyin: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          myFlagKuaishou: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          myFlagWeishi: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          myFlagHaokan: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          myFlagOthers: [
            { required: true, message: '示例： 0不能为空', trigger: 'blur' }
          ],
          myStatus: [
            { required: true, message: '状态：0为禁用；1为正常不能为空', trigger: 'blur' }
          ],
        }
      }
    },
    methods: {
      init (id) {
        this.visible = true;
        this.canSubmit = true;
        this.$nextTick(() => {
            this.$refs['dataForm'].resetFields()
            if (id) {
            getObj(id).then(response => {
                this.dataForm = response.data.data
            })
          }
        })
      },
      // 表单提交
      dataFormSubmit () {
        this.$refs['dataForm'].validate((valid) => {
          if (valid) {
            this.canSubmit = false;
            if (this.dataForm.id) {
                putObj(this.dataForm).then(data => {
                    this.$notify.success('修改成功')
                    this.visible = false
                    this.$emit('refreshDataList')
                }).catch(() => {
                    this.canSubmit = true;
                });
            } else {
                addObj(this.dataForm).then(data => {
                    this.$notify.success('添加成功')
                    this.visible = false
                    this.$emit('refreshDataList')
                }).catch(() => {
                    this.canSubmit = true;
                });
            }
          }
        })
      },
      //重置表单
      closeDialog() {
          this.$refs["dataForm"].resetFields()
      }
    }
  }
</script>
